package com.train.webadmin.app.model;

import com.baomidou.mybatisplus.annotation.*;
import com.train.common.core.annotation.*;
import lombok.Data;

import java.util.Date;

/**
 * 课程评论实体对象。
 *
 * @author xulei
 * @date 2025-03-07
 */
@Data
@TableName(value = "course_evaluate")
public class CourseEvaluate {

    /**
     * id。
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 老师id。
     */
    @TableField(value = "teacher_id")
    private Long teacherId;

    /**
     * 班级Id。
     */
    @TableField(value = "class_id")
    private Long classId;

    /**
     * 课程id。
     */
    @TableField(value = "course_id")
    private Long courseId;

    /**
     * 课程评分。
     */
    @TableField(value = "score")
    private Double score;

    /**
     * 学生id。
     */
    @TableField(value = "student_id")
    private Long studentId;

    /**
     * 课程评论的内容。
     */
    @TableField(value = "content")
    private String content;

    /**
     * 创造时间。
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 创建人。
     */
    @TableField(value = "create_user_id")
    private Long createUserId;

    /**
     * 修改时间。
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 修改用户id。
     */
    @TableField(value = "update_user_id")
    private Long updateUserId;

    @RelationOneToOne(
            masterIdField = "teacherId",
            slaveModelClass = TeacherInfo.class,
            slaveIdField = "id")
    @TableField(exist = false)
    private TeacherInfo teacherInfo;

    @RelationOneToOne(
            masterIdField = "classId",
            slaveModelClass = ClassInfo.class,
            slaveIdField = "id")
    @TableField(exist = false)
    private ClassInfo classInfo;

    @RelationOneToOne(
            masterIdField = "courseId",
            slaveModelClass = CourseInfo.class,
            slaveIdField = "id")
    @TableField(exist = false)
    private CourseInfo courseInfo;

    @RelationOneToOne(
            masterIdField = "studentId",
            slaveModelClass = StudentInfo.class,
            slaveIdField = "id")
    @TableField(exist = false)
    private StudentInfo studentInfo;

    /**
     * 课程内容主题适宜性。
     */
    @TableField(value = "course_score1")
    private Double courseScore1;

    /**
     * 课程内容内容针对性。
     */
    @TableField(value = "course_score2")
    private Double courseScore2;

    /**
     * 课程内容启发价值性。
     */
    @TableField(value = "course_score3")
    private Double courseScore3;

    /**
     * 授课老师教学素养。
     */
    @TableField(value = "teacher_score1")
    private Double teacherScore1;

    /**
     * 授课老师现场互动。
     */
    @TableField(value = "teacher_score2")
    private Double teacherScore2;

    /**
     * 授课老师教学效果。
     */
    @TableField(value = "teacher_score3")
    private Double teacherScore3;
}
